package sanmubird.club.spring.启动;


import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import sanmubird.club.spring.启动.bean.User1;
import sanmubird.club.spring.启动.bean.User2;
import sanmubird.club.spring.启动.bean.UserConfig;

/**
 * StartDemo
 *
 * @author sam
 * @date 2022/3/17 0017 15:39
 */
@Slf4j(topic = "c.StartDemo")
public class StartDemo {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(UserConfig.class);

        User1 bean1 = ctx.getBean(User1.class);
        User2 bean2 = ctx.getBean(User2.class);

        System.out.println(bean1);
        System.out.println(bean2);
    }

}
